using Microsoft.EntityFrameworkCore;
using Ccdk.Models;
namespace Ccdk.Data;


public class MyDbContext : DbContext
{
   public MyDbContext(DbContextOptions<MyDbContext> options) : base(options) { }

    public DbSet<Product> Product { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        var connectionString = "server=localhost;database=admin1;uid=root;pwd=123456";
        optionsBuilder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
    }
}
